package com.glela.platform.model.response;

import java.text.SimpleDateFormat;

import com.glela.platform.model.UserPointJournal;

public class ResponseUserPointJournalModel {
	private String businessTypeName;// 业务类型名称
	private String type;// 类型：+增加，-扣减
	private String amount;// 积分数量
	private String createTime;// 创建时间
	
	public ResponseUserPointJournalModel() {
		
	}
	
	private final static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
	
	public ResponseUserPointJournalModel(UserPointJournal userPointJournal) {
		this.businessTypeName = userPointJournal.getBusinessTypeName();
		this.type = userPointJournal.getAmount() > 0 ? "+" : "-";
		this.amount = userPointJournal.getAmount() > 0 ? "+" + userPointJournal.getAmount() : userPointJournal.getAmount() + "" ;
		this.createTime = sdf.format(userPointJournal.getCreateTime());
	}

	public String getBusinessTypeName() {
		return businessTypeName;
	}

	public void setBusinessTypeName(String businessTypeName) {
		this.businessTypeName = businessTypeName;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}
	
	
	
}
